<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'basic';
$return=array();
if($_RQ['op']=='basic'){
	if($_RQ['postdata']){
		$postdata=get_postdata();
		$this->plugin_setting('basic',$postdata);
		$this->model()->set_domain($postdata['domain']);
		exi('设置成功');
	}
	$return['item']=$this->plugin_setting('basic');
	$return['item']['shopcommission_type']=$return['item']['shopcommission_type']?:'0';
	$return['item']['commission_type']=$return['item']['commission_type']?:'0';
	$return['item']['url']=custom_url('jy_lvpai/manage.login/',true);
	$return['item']['plugins']=$return['item']['plugins']?$return['item']['plugins']:$plugins[1]['list'];
	$return['item']['myshop_tpl']=$return['item']['myshop_tpl']?:0;
	$htmls=array(
		'type'=>'edit',
		'desc'=>'参数设置',
		
		'edit_tab'=>true,
		'edits'=>array(
			array(
				'title'=>'基础设置',
				'list'=>array(
					array('type'=>'string','title'=>'平台名称','name'=>'title','help'=>'默认：出门旅拍'),
					array('type'=>'image','title'=>'平台LOGO','name'=>'logo'),
					array('type'=>'image','title'=>'后台LOGO','name'=>'logo2','help'=>'尺寸200*200'),
					array('type'=>'image','title'=>'底部LOGO','name'=>'logo3','help'=>'尺寸168*45'),
					array('type'=>'image','title'=>'登录背景图片','name'=>'bgimg','help'=>'尺寸1920*1080'),
					array('type'=>'string','title'=>'一句话描述','name'=>'onedesc','help'=>'默认：年轻/极致/口碑'),
					array('type'=>'string','title'=>'登录页英文','name'=>'oneendesc','help'=>'默认：Outbound tour customer display system'),
					array('type'=>'string','title'=>'品牌英文','name'=>'pinpai','help'=>'默认：PINGPAI'),
					array('type'=>'string','title'=>'加盟申请账户链接','name'=>'shenurl'),
					array('type'=>'string','title'=>'ICP','name'=>'icp'),
				)
			),
			array(
				'title'=>'域名绑定',
				'list'=>array(
					array('type'=>'string','title'=>'设置要绑定的域名','name'=>'domain','help'=>'【温馨提示】：这个域名绑定的是本插件（纯域名不含https://，http://）个人域名为空，则使用系统域名，填写域名后，需要将本域名用cname的方式解析到'.SITEROOT.'。'),
				)
			),
			array(
				'title'=>'申请协议',
				'list'=>array(
					array('type'=>'string','title'=>'协议名称','name'=>'applytitle'),
					array('type'=>'text','title'=>'协议内容','name'=>'applycontent'),
					
								
					)
			),
		
		)
	);

	$return['myshop_tpls']=array(
		array('id'=>0,'title'=>'默认风格','image'=>'../addons/jy_lvpai/resource/images/tpl00.png'),
		array('id'=>1,'title'=>'外卖风格','image'=>'../addons/jy_lvpai/resource/images/tpl01.png'),
	);
	$return['is']=array('0'=>'不扣除','1'=>'扣除');
	$return['selfbuy']=array('0'=>'关闭','1'=>'开启');
	$return['show']=array('0'=>'不显示','1'=>'显示');
	$return['commission_types']=$this->commission_types;
	$return['dish_feetypes']=$this->dish_feetypes;
	$return['shop_feetypes']=$this->shop_feetypes;
	$return['no_feetypes']=$this->no_feetypes;
	$return['htmls']=$htmls;
	exi($return);
}